#pragma once
#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
#include<stdlib.h>
#include<assert.h>
#include<stdbool.h>
#include<string.h>

#define FUSER "user.txt"
#define FPHONE "phone.dat"
#define MAXNAME 30
#define MAXTELEPHONE 100

typedef struct _phone
{
	char name[MAXNAME];
//p  private q office p1552379#q151789
	char telephone[MAXTELEPHONE];
	struct _phone* next;
}Phone;

//user.txt
typedef struct _user
{
	char userID[20];
	char password[64];
	struct _user* next;
}User;

enum operations
{
	ADD = 1, DELETE, MODIFY, DISPLAY,EXIT
};



Phone* createPhone();
int addRecord(Phone* head);
void display(Phone* head);
int deletePhone(Phone* head);
bool modifyPhone(Phone* head);
int saveData(Phone* head, char* fileName);
Phone* readData(char* fileName,int* num);
int splitTelPhone(char s[], char tel[][15]);
void mainMenu();
void menu();










